home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / AFG_QDEF.422 < prev    next >
Text File  |  1993-03-25  |  4KB  |  124 lines

  1. AFG_QDEF.MOD (makes Q-Scan configuration easier)
  2. Alken Foijet Godden #9 @8859  South 
  3. Sat, Mar 13, 1993 at 3:05:30 pm
  4. 1MOD NAME    : 2AFG_QDEF.MOD
  5. 1WRITER      : 2Alken Foijet Godden
  6. 1DESCRIPTION : 2Makes configuring Q-Scans much, much, much easyer.
  7.  
  8.   WWIV is a great piece of software especially since modifications are so
  9. simple.  Wayne Bell has done a great job, and although he seems to get a
  10. great deal of flack for his writing style, I think he's proven the worth
  11. of WWIV.
  12.   This is one thing Wayne Bell has ignored for some time.  And now that
  13. WWIV can handle an incredible quantity of subs it is totally nessesary.
  14.  
  15.  
  16.  
  17. /*
  18. In DEFAULTS.C replace the function void l_config_qscan(void) with this
  19. function:
  20.           (if you want you can remove the prototype from FCNS.H)
  21. */
  22.  
  23. void my_config_qscan(int start,char star)
  24. {
  25.   int i,abort;
  26.   char s[81];
  27.  
  28.   abort=0;
  29.   if ((star==0) || (okansi()==0)) {
  30.     outchr(12);
  31.     outstr(get_string(441));
  32.     nl();
  33.   } else
  34.     outstr("\x1B\x5B\x48\x1B\x5B\x42");
  35.   for (i=0;(start<num_subs)&& (i<thisuser.screenlines-5) &&
  36.         (usub[start].subnum!=-1)&&(!abort);start++,i++) {
  37.     if ((!star) || (!okansi())) {
  38.       sprintf(s,"%c %s. %s",
  39.        (qsc_q[usub[start].subnum/32]&(1L<<(usub[start].subnum%32)))?'*':' ',
  40.        usub[start].keys,
  41.        subboards[usub[start].subnum].name);
  42.       pla(s,&abort);
  43.     } else {
  44.       sprintf(s,"%c\x1B\x5B\x31\x44\x1B\x5B\x42",
  45.              (qsc_q[usub[start].subnum/32]&
  46.                       (1L<<(usub[start].subnum%32)))?'*':' ');
  47.       outstr(s);
  48.     }
  49.   }
  50. }
  51.  
  52. /*
  53. Still in DEFAULTS.C replace the function void config_qscan(void) with this
  54. function:
  55. */
  56.  
  57. void config_qscan(void)
  58. {
  59.   char *s,star_only=0;
  60.   int i,done,where=0;
  61.  
  62.   my_config_qscan(where,star_only);
  63.   done=0;
  64.   helpl=7;
  65.   do {
  66.     nl();
  67. /*
  68.     INPUT THE NEXT STRING INTO THE STRING FILE OR JUST LEAVE IT.
  69.  
  70.     outstr(get_string(442));
  71.  
  72. */
  73.     outstr("Enter Sub #, List ?, Quit, [ENTER] =Next.");
  74.     nl();
  75.     outstr(get_string(443));
  76.     s=mmkey(0);
  77.     outstr("\b\b  ");
  78.     if (s[0]) {
  79.       for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++)
  80.            if (strcmp(usub[i].keys,s)==0)
  81.              qsc_q[usub[i].subnum/32] ^= (1L<<(usub[i].subnum%32));
  82.       switch (s[0]) {
  83.            case 'Q':
  84.              return;
  85.            case '?':
  86.              if (okansi())
  87.             outstr("\r\x1B\x5B\x4B\x1B\x5B\x31\x41\x1B\x5B\x4B");
  88.           else
  89.             nl();
  90.           outstr("[View Subs] Starting at what number?");
  91.              s=mmkey(0);
  92.              for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++)
  93.                if (strcmp(usub[i].keys,s)==0)
  94.                  where=i;
  95.                star_only=0;
  96.              break;
  97.            default:
  98.              star_only=1;
  99.              break;
  100.       }
  101.     } else {
  102.       if (((where+thisuser.screenlines-5) < num_subs) &&
  103.             (usub[where+thisuser.screenlines-5].subnum!=-1)) {
  104.      where=(where+thisuser.screenlines-5);
  105.         star_only=0;
  106.       }
  107.     }
  108.     if (okansi() || (!star_only))
  109.       my_config_qscan(where,star_only);
  110.   } while ((!done) && (!hangup));
  111. }
  112.  
  113. /*
  114.     Congrats', you're done.
  115.  
  116.     The reason I use HEX instead of the ascii charecters is so there is so
  117. WWIV (or your editor) doesn't mistake them for control charecters.  (in the
  118. transmission of this file)
  119.  
  120.                              5Ω1lkën
  121.                                   5ƒ1óijëτ
  122.                                        5G1σδδën
  123. */
  124.